package com.moto.enums;

public enum UserType {
	
	PHONE("0","手机注册"),
	WeiChat("1","微信注册"),
	QQ("2","QQ注册"),
	WeiBo("3","微博注册");
	private String typeId;
	private String typeName;
	public String getTypeId() {
		return typeId;
	}
	public void setTypeId(String typeId) {
		this.typeId = typeId;
	}
	public String getTypeName() {
		return typeName;
	}
	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}
	private UserType(String typeId, String typeName) {
		this.typeId = typeId;
		this.typeName = typeName;
	}
	public static String getTypeName(String typeId){
		UserType[] values = UserType.values();
		for (UserType userType : values) {
			if(userType.getTypeId().equals(typeId)){
				return userType.getTypeName();
			}
		}
		return null;
	}
	
}
